<template>
  <van-config-provider :theme="(store.theme as any)">
    <div class="t-container">
      <router-view v-slot="{ Component }">
        <Loading v-show="dayStore.LOADING"></Loading>
        <keep-alive>
          <component :is="Component"/>
        </keep-alive>
      </router-view>
    </div>
  </van-config-provider>
</template>

<script setup lang="ts">
import {onMounted, computed,watch} from 'vue'
import pinia, {useAppStore} from './store'
import {useRoute} from "vue-router";
import {useDayStore} from "/@/store/modules/dayState";
import Loading from "./components/loading.vue";
import {mapState} from 'pinia';

const store = useAppStore()
const dayStore = useDayStore(pinia)

onMounted(() => {
  document.body.classList.toggle('van-theme-' + store.theme)
  let route: any = useRoute();
  console.log(route.query, 'query222')
  localStorage.setItem('token', route.query.token)
})
</script>

<style></style>
